
import React, { useState } from 'react';
import { Row, Col, Card, Switch, Statistic, Tooltip, Space, Tabs } from 'antd'
import { history, connect } from 'umi';
import { ExclamationCircleOutlined, } from '@ant-design/icons'
import PromoterCheckList from './components/promoterCheckList';
import PromoterList from './components/PromoterList';
const Setting = (props) => {
    const { zm } = props
    const [activeTabKey, setActiveTabKey] = useState('promoterList');
    const tabList = [
        {
            label: `推广员列表`,
            key: 'promoterList',
            children: null,
        },
        {

            label: `审核列表`,
            key: 'promoterCheckList',
            children: null,
        },
    ];
    const renderContent = {
        promoterList: <PromoterList zm={zm}></PromoterList>,
        promoterCheckList: <PromoterCheckList></PromoterCheckList>
    }[activeTabKey]
    const onTabChange = (key) => {
        setActiveTabKey(key);
    };
    return <Card style={{
        width: '100%',
        minHeight: 900
    }}>
        <Tabs
            onChange={onTabChange}
            activeKey={activeTabKey}
            items={tabList}

            type="card"
        >
        </Tabs>
        {renderContent}
    </Card>


}

export default connect(({ loading }) => ({

    loading: loading.models.institution,
}))(Setting);
